package com.second.hand.trading.server.service;

import com.second.hand.trading.server.wb.pojo.Friend;
import com.second.hand.trading.server.wb.pojo.Message;
import com.second.hand.trading.server.wb.pojo.ResultMessage;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface WebSocketService {

    /*@Insert("insert into db_second_hand_trading.friendship(UserID1,UserID2) values(${username},${tousername}) ")
    void MessageUserLog(String username,String tousername);

    @Insert("insert into db_second_hand_trading.messages(SenderID,ReceiverID,Content) values(${username},${tousername},${message}) ")
    void MessageLog(String username, String tousername,String message);

    @Select("select SenderID,ReceiverID,Content from db_second_hand_trading.messages where SenderID = #{username} and ReceiverID = #{tousername}")
    List<Message> Allmessage(String username, String tousername);

    @Select("select Avatar from db_second_hand_trading.users where UserID = #{username}")
    String Avatar(String username);*/

    public ResultMessage resultMessage(String username, String tousername);

    public List<Friend> Friend(String username);

    public void messageStorage(String username,String tousername,String message);
}
